<template>
	<view class="container">
		<image src="../../static/images/public/failIcon.png" mode=""></image>
		<view class="title">审核不通过</view>
		<view class="phone-tel" @tap="callPhone">
			客服电话：
			<text> {{phone}}</text>
		</view>
		<view class="resion">未通过原因 : {{msg}}</view>
		
		<button class="sub" @tap="reApply">重新申请</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				msg: "",
				phone: uni.getStorageSync('servicePhone'),
				from: "",
				ratio: null,
			};
		},
		onLoad(options) {
			this.msg = options.msg
			if (options.from) {
				this.from =  options.from
			}
			if (options.ratio) {
				this.ratio =  options.ratio
			}
			
			if(options.from == "offline") {
				uni.setNavigationBarTitle({
					title:"开通线下商户"
				})
			} else if (options.from == "online") {
				uni.setNavigationBarTitle({
					title:"开通线上商户"
				})
			} else if (options.from == "change") {
				uni.setNavigationBarTitle({
					title:"商户信息修改"
				})
			} else if (options.from == "bankChange") {
				uni.setNavigationBarTitle({
					title:"银行卡信息修改"
				})
			} else if (options.from == "signChange") {
				uni.setNavigationBarTitle({
					title:"签约比例修改"
				})
			}
		},
		methods: {
			reApply() {
				if (this.from == 'offline'||this.from == 'change'||this.from == 'online') {
					uni.redirectTo({
						url:"./shopInfoEdit?type=" + this.from
					})
				} else if (this.from == 'bankChange') {
					uni.redirectTo({
						url:"../bankCardEdit/bankCardEdit"
					})
				} else if (this.from == 'signChange') {
					uni.redirectTo({
						url:"../nowSignScale/nowSignScale?ratio=" + this.ratio
					})
				}
				
			},
			callPhone(){
				uni.makePhoneCall({
					phoneNumber: this.phone
				})
			}
		}
	};
</script>

<style lang="scss" scoped>
	.phone-tel{
		margin-top: 50rpx;
		text-align: center;
		font-size: 26rpx;
		text{
			font-size: 30rpx;
			color: #57be6a;
		}
	}
		.container{
			padding: 0 30rpx; 
			image{
				display: block;
				margin: 0 auto;
				padding: 150rpx 0 36rpx;
				width:150rpx;
				height: 150rpx;
				border-radius: 75rpx;
			}
			.title{
				text-align: center;
				font-size:26rpx;
				color:rgba(51,51,51,1);
			}
			.resion{
				margin-top: 62rpx;
				text-align: center;
				font-size:30rpx;
				color:#FB3737;
			}
			.sub{
				position: fixed;
				left: 75rpx;
				bottom: 60rpx;
				width:600rpx;
				height:80rpx;
				background:$theme-color;
				border-radius:40rpx;
				text-align: center;
				line-height: 80rpx;
				color: #fff;
				font-weight: bold;
				font-size: 32rpx;
			}
		}
</style>
